Skip to content

fix(autoresearch): add GitHub Issue escalation as step 7 in stuck detection#183

Merged
maystudios merged 1 commit intomainfrom
worktree-agent-a6ae20ca
Mar 25, 2026
Merged

fix(autoresearch): add GitHub Issue escalation as step 7 in stuck detection#183
maystudios merged 1 commit intomainfrom
worktree-agent-a6ae20ca

Conversation

@maystudios
Copy link
Copy Markdown
Owner

Summary

  • Adds step 7 to the "When Stuck" section of the autoresearch loop protocol
  • The new step instructs the agent to create a diagnostic GitHub Issue and escalate to the user when all 6 existing recovery steps have been exhausted
  • Prevents infinite stuck loops by requiring human guidance after escalation

Test plan

  • Verified markdown formatting matches existing numbered steps
  • Unit tests pass (529/529; 1 pre-existing build-artifact failure unrelated to this change)
  • E2E skipped (template-only markdown change)

🤖 Generated with Claude Code

…ection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 25, 2026 17:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the autoresearch “When Stuck” protocol to add an explicit escalation path via creating a diagnostic GitHub Issue, intended to prevent infinite recovery loops and require human guidance after repeated failures.

Changes:

  • Adds a new Step 7 (“Escalate”) in the “When Stuck” section.
  • Documents a gh issue create command template with labels/title/body placeholders for diagnostics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

4. Try combining 2-3 previously successful changes.
5. Try the opposite of what has not been working.
6. Try a radical architectural change.
7. **Escalate** — If still stuck after all above: create a diagnostic GitHub Issue (`gh issue create --label "type:bug" --label "maxsim:auto" --title "Stuck: [scope] after [N] consecutive failures" --body "[full context: iterations attempted, approaches tried, current metric value, TSV log summary, suspected blockers]"`) and escalate to the user. Do not continue the loop — wait for human guidance.
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new escalation step instructs the agent to stop and wait for human guidance, but earlier in this same document “Unbounded Mode (default)” says “Never stop. Never ask if the agent should continue.” Please clarify that escalation is an explicit exception to Unbounded Mode (e.g., update the Unbounded Mode text or reference the exception here) to avoid contradictory instructions.

Copilot uses AI. Check for mistakes.
4. Try combining 2-3 previously successful changes.
5. Try the opposite of what has not been working.
6. Try a radical architectural change.
7. **Escalate** — If still stuck after all above: create a diagnostic GitHub Issue (`gh issue create --label "type:bug" --label "maxsim:auto" --title "Stuck: [scope] after [N] consecutive failures" --body "[full context: iterations attempted, approaches tried, current metric value, TSV log summary, suspected blockers]"`) and escalate to the user. Do not continue the loop — wait for human guidance.
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title template includes “after [N] consecutive failures”, but this section is specifically triggered by “5 consecutive discards or crashes”. Consider making the title/wording consistent with the trigger (e.g., use 5, or 5+), so the created Issue clearly reflects the actual stuck threshold being applied.

Suggested change
7. **Escalate** — If still stuck after all above: create a diagnostic GitHub Issue (`gh issue create --label "type:bug" --label "maxsim:auto" --title "Stuck: [scope] after [N] consecutive failures" --body "[full context: iterations attempted, approaches tried, current metric value, TSV log summary, suspected blockers]"`) and escalate to the user. Do not continue the loop — wait for human guidance.
7. **Escalate** — If still stuck after all above: create a diagnostic GitHub Issue (`gh issue create --label "type:bug" --label "maxsim:auto" --title "Stuck: [scope] after 5 consecutive discards or crashes" --body "[full context: iterations attempted, approaches tried, current metric value, TSV log summary, suspected blockers]"`) and escalate to the user. Do not continue the loop — wait for human guidance.

Copilot uses AI. Check for mistakes.
@maystudios maystudios merged commit fc407b6 into main Mar 25, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.13.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants